package com.example.controller;

import com.example.dto.SupplierQueryVO;
import com.example.entity.ResBody;
import com.example.entity.SupplierInfo;
import com.example.service.SupplierService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/master/api/supplier/suggest")
public class SupplierController {

    @Resource
    private SupplierService supplierService;

    @GetMapping("/v1")
    public ResBody<List<SupplierInfo>> list(SupplierQueryVO vo) {
        return ResBody.success(supplierService.listByQuery(vo));
    }
}
